package com.liuyjy.base.mybatisplus.aspect;

import com.liuyjy.base.mybatisplus.cache.TableSuffixCache;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;

/**
 * @Author liuyjy
 * @Date 2023/3/29 14:11
 * @Description: 后置通知
 * https://blog.csdn.net/Elma_Programmer/article/details/127404272
 **/
@Aspect
public class AfterAspect {

    @After(
            "@annotation(org.springframework.web.bind.annotation.RequestMapping) || " +
                    "@annotation(org.springframework.web.bind.annotation.GetMapping) || " +
                    "@annotation(org.springframework.web.bind.annotation.PostMapping) || " +
                    "@annotation(org.springframework.scheduling.annotation.Async) || " +
                    "@annotation(org.springframework.cloud.stream.annotation.StreamListener) || " +
                    "execution(public * com.syzton.*.*.*.remote.*RemoteImpl.*(..))"
    )
    public void after() {
        TableSuffixCache.remove();
    }
}
